/**
 * 
 */
package name.marz.to.go.ahg.core.executer;

import java.io.File;
import java.net.URI;

import name.marz.to.go.ahg.core.AutoGetterHttpClient;
import name.marz.to.go.ahg.core.responsehandler.FileResponseHandler;

import org.apache.http.client.ResponseHandler;

/**
 * @author mgoto
 *
 */
public abstract class AbstractPostFileDownloader extends AbstractPostExecuter<File> {
	protected File file;

	public AbstractPostFileDownloader(URI uri, AutoGetterHttpClient client, File file) {
		this(uri, client,file,null);
	}
	public AbstractPostFileDownloader(URI uri, AutoGetterHttpClient client, File file, String pageName) {
		super(uri, client,pageName);
		this.file = file;
	}
	
	@Override
	protected ResponseHandler<File> getResponseHandler() {
		return new FileResponseHandler(file,client.getDefaultCharset());
	}

}
